<template>
	<view>
		<view class="evaluate-list evaluate_a" v-for="(item, index) in list" :key="index">
			<view class="evaluate_a_b">
				<view class="evaluate_a_b_a">
					<view class="evaluate_a_a">
						<image :src="item.avatar"></image>
					</view>
					<view class="evaluate_a_b_a_a">{{item.nickname}}</view>
					<view class="evaluate_a_b_a_b">
						<view class="evaluate_a_b_b">{{item.create_time}}</view>
					</view>
				</view>
				<view class="evaluate_a_b_c">{{item.comment}}</view>
				<view class="evaluate_a_b_d" v-if="item.image">
					<view class="evaluate_a_b_d_a" v-for="(item1, index1) in item.image" :key="index1" :data-current="index1" :data-uri="item1" @tap="previewImage">
						<custom-image width="230rpx" height="230rpx" radius="6rpx" :src="item1" />
					</view>
				</view>
				<view v-if="item.reply">
					<view class="evaluate_a_b_c" style="color: red;">管理员回复：</view>
					<view class="evaluate_a_b_c">{{item.reply}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '@/common/request.js';
	export default {
		name:"EvaluateList",
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {
				baseUrl_img:request.baseUrl_img,
			};
		},
		onShow(){
				console.log(list);
		},
		methods: {
			previewImage(e) {
			  const {
			    current,
			    uri
			  } = e.currentTarget.dataset;
			  let urls = [uri];
			  uni.previewImage({
			    current,
			    // 当前显示图片的http链接
			    urls // 需要预览的图片http链接列表
			
			  });
			}
		}
	}
</script>
<style>
	.evaluate_a{
		width: 710rpx;
		height: auto;
		padding-top:35rpx;
		margin: auto;
		overflow: hidden;
	}
	.evaluate_a_a{
		width: 48rpx;
		height: 48rpx;
		float: left;
		border-radius: 50%;
	}
	.evaluate_a_a image{
		width: 48rpx;
		height: 48rpx;
		border-radius: 50%;
	}
	.evaluate_a_b{
		float: left;
		width: 100%;
		padding-bottom: 38rpx;
		border-bottom: 1rpx solid #EEEEEE;
	}
	.evaluate_a_b_a{
		overflow: hidden;
	}
	.evaluate_a_b_a_a{
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
		float: left;
		height: 48rpx;
		line-height: 48rpx;
		margin-left: 17rpx;
	}
	.evaluate_a_b_a_b{
		float: right;
	}
	.evaluate_a_b_b{
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #999999;
		line-height: 48rpx;
	}
	.evaluate_a_b_c{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #666666;
		overflow: hidden;
		margin-top: 30rpx;
	}
	.evaluate_a_b_d{
		overflow: hidden;
	}
	.evaluate_a_b_d_a{
		width: 230rpx;
		height: 230rpx;
		float: left;
		margin-right:6rpx;
		margin-top: 23rpx;
	}
	.evaluate_a_b_d_a image:nth-child(3){
		margin-right: 0;
	}
</style>
